package com.sunwayworld.basemodule.common.eptstorage.acqconfig.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.sunwayworld.framework.constant.Constant;
import com.sunwayworld.framework.data.annotation.Id;
import com.sunwayworld.framework.data.annotation.NotNull;
import com.sunwayworld.framework.data.annotation.Table;
import com.sunwayworld.framework.data.annotation.Transient;
import com.sunwayworld.framework.support.domain.AbstractInsertable;
import com.sunwayworld.framework.support.domain.Insertable;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 协议采集指令
 */
@Table("T_LIMS_EQUIPT_ACQ_CONFIG_INST")
public class LimsEquiptAcqConfigInstBean extends AbstractInsertable<Long> implements Insertable<Long> {

    @Transient
    private static final long serialVersionUID = -2311583532848573576L;

    @Id
    private Long id;// 主键
    private String acqConfigId;// 设备ID
    private String instructionName;// 指令名称
    @NotNull(defaultValue = Constant.NO)
    private String hixFlag;// 16进制发送
    @NotNull(defaultValue = "subscribe")
    private String conversationRole;// 通讯角色
    @NotNull(defaultValue = "0")
    private String qos;// 通讯质量
    @NotNull(defaultValue = "result")
    private String instructionType;// 指令用途
    private String instruction;// 发送指令
    private String scriptId;// 数据解析脚本
    private String remark;// 备注
    private String createdById;// 制单人编码
    private String createdByName;// 制单人名称
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;// 制单时间
    private String createdByOrgId;// 制单人单位编码
    private String createdByOrgName;// 制单人单位名称
    private String taskFlag;//是否定时发送
    private String acqFrequency;//定时频率
    private String resultSaveType;//数据存储方式

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAcqConfigId() {
        return acqConfigId;
    }

    public void setAcqConfigId(String acqConfigId) {
        this.acqConfigId = acqConfigId;
    }

    public String getInstructionName() {
        return instructionName;
    }

    public void setInstructionName(String instructionName) {
        this.instructionName = instructionName;
    }

    public String getHixFlag() {
        return hixFlag;
    }

    public void setHixFlag(String hixFlag) {
        this.hixFlag = hixFlag;
    }

    public String getInstructionType() {
        return instructionType;
    }

    public void setInstructionType(String instructionType) {
        this.instructionType = instructionType;
    }

    public String getInstruction() {
        return instruction;
    }

    public void setInstruction(String instruction) {
        this.instruction = instruction;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreatedById() {
        return createdById;
    }

    public void setCreatedById(String createdById) {
        this.createdById = createdById;
    }

    public String getCreatedByName() {
        return createdByName;
    }

    public void setCreatedByName(String createdByName) {
        this.createdByName = createdByName;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public String getCreatedByOrgId() {
        return createdByOrgId;
    }

    public void setCreatedByOrgId(String createdByOrgId) {
        this.createdByOrgId = createdByOrgId;
    }

    public String getCreatedByOrgName() {
        return createdByOrgName;
    }

    public void setCreatedByOrgName(String createdByOrgName) {
        this.createdByOrgName = createdByOrgName;
    }

    public String getScriptId() {
        return scriptId;
    }

    public void setScriptId(String scriptId) {
        this.scriptId = scriptId;
    }

    public String getTaskFlag() {
        return taskFlag;
    }

    public void setTaskFlag(String taskFlag) {
        this.taskFlag = taskFlag;
    }

    public String getAcqFrequency() {
        return acqFrequency;
    }

    public void setAcqFrequency(String acqFrequency) {
        this.acqFrequency = acqFrequency;
    }

    public String getResultSaveType() {
        return resultSaveType;
    }

    public void setResultSaveType(String resultSaveType) {
        this.resultSaveType = resultSaveType;
    }

    public String getConversationRole() {
        return conversationRole;
    }

    public void setConversationRole(String conversationRole) {
        this.conversationRole = conversationRole;
    }

    public String getQos() {
        return qos;
    }

    public void setQos(String qos) {
        this.qos = qos;
    }
}
